package de.hs.rm.UJAdapter;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Set;

import javax.lang.model.type.ArrayType;
import javax.management.AttributeChangeNotification;
import javax.management.AttributeNotFoundException;
import javax.management.InstanceNotFoundException;
import javax.management.JMX;
import javax.management.ListenerNotFoundException;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanException;
import javax.management.MBeanInfo;
import javax.management.MBeanNotificationInfo;
import javax.management.MBeanOperationInfo;
import javax.management.MBeanParameterInfo;
import javax.management.MBeanServerConnection;
import javax.management.MBeanServerDelegate;
import javax.management.MBeanServerDelegateMBean;
import javax.management.MalformedObjectNameException;
import javax.management.NotificationListener;
import javax.management.ObjectName;
import javax.management.ReflectionException;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.TabularData;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;


import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.upnp.UPnPDevice;
import org.osgi.service.upnp.UPnPService;
import org.osgi.service.upnp.UPnPStateVariable;

import de.hs.rm.UJAdapter.event.impl.jmx.UJAttributeChangeNotificationListener;
import de.hs.rm.UJAdapter.event.impl.jmx.UJEasyRegisterNotificationListener;
import de.hs.rm.UJAdapter.event.impl.jmx.UJRegisterNotificationListener;
import de.hs.rm.UJAdapter.factory.UJDeviceFactory;
import de.hs.rm.UJAdapter.factory.UJServiceFactory;
import de.hs.rm.UJAdapter.impl.UJDevice;
import de.hs.rm.UJAdapter.impl.UJService;
import de.hs.rm.UJAdapter.util.StringGenerationUtil;

public class Activator implements BundleActivator {

	private UJAdapter ujAdapter = null;
	
	public void start(BundleContext context) throws Exception {
		
		ujAdapter = new UJAdapter();
		ujAdapter.startAdapter(context);
	}
	

	public void stop(BundleContext context) throws Exception {
		if(ujAdapter != null)
			ujAdapter.stopAdapter(context);

	}

}
